package poo.sortable;

public abstract class Sortable {

	public abstract int compareTo(Sortable s);

	public static void sort(Sortable[] v) {
		for (int j = v.length - 1; j > 0; j--) {
			int iMax = 0;
			for (int i = 1; i <= j; i++)
				if (v[i].compareTo(v[iMax]) > 0)
					iMax = i;

			Sortable park = v[j];
			v[j] = v[iMax];
			v[iMax] = park;
		}
	}
}
